from zope.interface import Interface

from meercat.interfaces.resource import IResource,IMutableResource
from meercat.interfaces.instance import IInstance,IMutableInstance
from meercat.interfaces.metadata import IMetadata



class IPickleable(Interface):
    """ A marker interface for something to be pickleable """

class IOrderedRegistry(Interface):
    def register(self, name, component=None, remove=False,
                 first=False, last=False, before=None, after=None):
        """ Register a new component (or remove it) """
    
    def __iter__(self):
        """ Return an iterator for the registered components in order """
    
    def __len__(self):
        """ Return the number of registered components """
        
    def __contains__(self, name):
        """ Test for containemt """
    
    def __getitem__(self, name):
        """ Return a named component """
    
    def __setitem__(self, name, component):
        """ Replace a named component in it's existing location """
    
    def __delitem__(self, name):
        """ Remove a named component """
        
